package com.liqing.movecomment.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author
 * @author 2023-02-28 01:36
 * description:
 */
@ApiModel("登入模型")
public class UserDTO {
    private String username;
    private String password;
    @ApiModelProperty("验证码")
    private int code;
    String uuid;
    /**
     * 1是管理员，2是会员用户，3是普通用户
     */
    @ApiModelProperty("1是管理员，2是会员用户，3是普通用户")
    private Integer level;

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public UserDTO() {
    }

    @SuppressWarnings("all")
    public String getUsername() {
        return this.username;
    }

    @SuppressWarnings("all")
    public String getPassword() {
        return this.password;
    }

    @SuppressWarnings("all")
    public int getCode() {
        return this.code;
    }

    @SuppressWarnings("all")
    public String getUuid() {
        return this.uuid;
    }

    /**
     * 1是管理员，2是会员用户，3是普通用户
     */
    @SuppressWarnings("all")
    public Integer getLevel() {
        return this.level;
    }

    @SuppressWarnings("all")
    public void setUsername(final String username) {
        this.username = username;
    }

    @SuppressWarnings("all")
    public void setPassword(final String password) {
        this.password = password;
    }

    @SuppressWarnings("all")
    public void setCode(final int code) {
        this.code = code;
    }

    @SuppressWarnings("all")
    public void setUuid(final String uuid) {
        this.uuid = uuid;
    }

    /**
     * 1是管理员，2是会员用户，3是普通用户
     */
    @SuppressWarnings("all")
    public void setLevel(final Integer level) {
        this.level = level;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UserDTO)) return false;
        final UserDTO other = (UserDTO) o;
        if (!other.canEqual((Object) this)) return false;
        if (this.getCode() != other.getCode()) return false;
        final Object this$level = this.getLevel();
        final Object other$level = other.getLevel();
        if (this$level == null ? other$level != null : !this$level.equals(other$level)) return false;
        final Object this$username = this.getUsername();
        final Object other$username = other.getUsername();
        if (this$username == null ? other$username != null : !this$username.equals(other$username)) return false;
        final Object this$password = this.getPassword();
        final Object other$password = other.getPassword();
        if (this$password == null ? other$password != null : !this$password.equals(other$password)) return false;
        final Object this$uuid = this.getUuid();
        final Object other$uuid = other.getUuid();
        if (this$uuid == null ? other$uuid != null : !this$uuid.equals(other$uuid)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof UserDTO;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + this.getCode();
        final Object $level = this.getLevel();
        result = result * PRIME + ($level == null ? 43 : $level.hashCode());
        final Object $username = this.getUsername();
        result = result * PRIME + ($username == null ? 43 : $username.hashCode());
        final Object $password = this.getPassword();
        result = result * PRIME + ($password == null ? 43 : $password.hashCode());
        final Object $uuid = this.getUuid();
        result = result * PRIME + ($uuid == null ? 43 : $uuid.hashCode());
        return result;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "UserDTO(username=" + this.getUsername() + ", password=" + this.getPassword() + ", code=" + this.getCode() + ", uuid=" + this.getUuid() + ", level=" + this.getLevel() + ")";
    }
    //</editor-fold>
}
